package com.neusoft.bizcore.activiti.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Proxy;
import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

/**
 * @author WYS
 * @date 2020年9月8日 上午9:43:27
 */
@Getter
@Setter
@Entity
@Proxy(lazy = false)
@org.hibernate.annotations.Table(appliesTo = "wf_lock_data", comment = "锁定业务数据")
@Table(name = "wf_lock_data")
public class LockData extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    @Length(max = 255, message = "工作流instanceId不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '工作流instanceId'")
    private String instanceId;

    @Length(max = 255, message = "工作流TaskId不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '工作流TaskId'")
    private String taskId;

    @Length(max = 255, message = "工作流nodeId不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NOT NULL COMMENT '工作流nodeId'")
    private String nodeId;

    @Length(max = 50, message = "工单号不能超过{max}位")
    @Column(length = 50, nullable = false)
    @Comment("varchar(50) NOT NULL COMMENT '工单号'")
    private String workNum;

    @Length(max = 100, message = "业务编码")
    @Column(length = 100, nullable = false)
    @Comment("varchar(100) NOT NULL COMMENT '业务编码'")
    private String code;

    @Comment("BIGINT NULL COMMENT '数据ID'")
    @Column(nullable = true)
    private Long dataId;

    @Length(max = 100, message = "业务名称")
    @Column(length = 100, nullable = false)
    @Comment("varchar(100) NOT NULL COMMENT '业务名称'")
    private String serviceName;

    @Length(max = 100, message = "业务表名称")
    @Column(length = 100, nullable = true)
    @Comment("varchar(100) NULL COMMENT '业务表名称'")
    private String tableName;
}
